<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>断点调试</title>

    <script>
        // 要求一行打印多个星星
        var num = prompt('请输入你需要打印的星星数:');
        var str = '';  //定义一个空字符串，让其和需要打印的东西进行字符相加，即可成行打印出
        for (var i = 1; i <= num; i++) {
            str = str + '★';
        }
        console.log(str);

    </script>

</head>

<body>

</body>

</html>